package ru.scalabook.algorithms.games.poker

import weaver.FunSuite

object PokerSuite extends FunSuite:
  test("doesPlayer1Win"):
    // Pair of Fives, Pair of Eights
    expect.all(
      !Poker("5H 5C 6S 7S KD", "2C 3S 8S 8D TD").doesPlayer1Win,
      // Highest card Ace, Highest card Queen
      Poker("5D 8C 9S JS AC", "2C 5C 7D 8S QH").doesPlayer1Win,
      // Three Aces, Flush with Diamonds
      !Poker("2D 9C AS AH AC", "3D 6D 7D TD QD").doesPlayer1Win,
      // Pair of Queens Highest card Nine, Pair of Queens Highest card Seven
      Poker("4D 6S 9H QH QC", "3D 6D 7H QD QS").doesPlayer1Win,
      // Full House With Three Fours, Full House with Three Threes
      Poker("2H 2D 4C 4D 4S", "3C 3D 3S 9S 9D").doesPlayer1Win
    )
end PokerSuite
